#pragma region Licensing
/*
       LOGL::GLib -> LorgonJortle's OpenGL Game Library
       Copyright (C) 2011  Jesse 'LorgonJortle' Wilkerson

       This program is free software: you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation, either version 3 of the License, or
       (at your option) any later version.

       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.

       You should have received a copy of the GNU General Public License
       along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#pragma endregion

#include "Rect2.h"

namespace LOGL_GLib
{
     namespace Common
     {
          /******************************************************************************
           Rect2::Rect2();
                    Arguments:
                         void

                    Description:
                         Constructs a Rect2 with the X and Y components set to zero
                         and the width and height set to one.

                    Returns:
                         The Rect2 object.
          *******************************************************************************/
          Rect2::Rect2()
          {
               X = Y = 0;
               Width = Height = 1;
          }

          /******************************************************************************
           Rect2::Rect2(GLint _X, GLint _Y, GLint _Width, GLint _Height);
                    Arguments:
                         GLint _X:
                              The X position of the rectangle.
                         GLint _Y:
                              The Y position of the rectangle.
                         GLint _Width:
                              The width of the rectangle.
                         GLint _Height:
                              The height of the rectangle.

                    Description:
                         Constructs a Rect2 with the specified X, Y, Width, and Height.

                    Returns:
                         The Rect2 object.
          *******************************************************************************/
          Rect2::Rect2(GLint _X, GLint _Y, GLint _Width, GLint _Height)
          {
               X = _X;
               Y = _Y;
               Width = _Width != 0 ? _Width : 1;
               Height = _Height != 0 ? _Height : 1;
          }

     } /* Namespace Common. */
} /* Namespace LOGL_GLib. */
